home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / lib / resolve_all.pro < prev    next >
Text File  |  1997-07-08  |  2KB  |  72 lines

  1. ; $Id: resolve_all.pro,v 1.4 1997/01/15 03:11:50 ali Exp $
  2. ;
  3. ; Copyright (c) 1995-1997, Research Systems, Inc.  All rights reserved.
  4. ;    Unauthorized reproduction prohibited.
  5. ;+
  6. ; NAME:
  7. ;    RESOLVE_ALL
  8. ;
  9. ; PURPOSE:
  10. ;    Resolve (by compiling) all procedures and functions.
  11. ;    This is useful when preparing .sav files containing all the IDL
  12. ;    routines required for an application.
  13. ; CATEGORY:
  14. ;    Programming.
  15. ; CALLING SEQUENCE:
  16. ;    RESOLVE_ALL
  17. ; INPUTS:
  18. ;    None.
  19. ; KEYWORD PARAMETERS:
  20. ;    QUIET = if set, produce no messages.
  21. ; OUTPUTS:
  22. ;    No explicit outputs.
  23. ; COMMON BLOCKS:
  24. ;    None.
  25. ; SIDE EFFECTS:
  26. ; RESTRICTIONS:
  27. ;    Will not resolve procedures or functions that are called via
  28. ;    CALL_PROCEDURE, CALL_FUNCTION, or EXECUTE.  Only explicit calls
  29. ;    are resolved.
  30. ;
  31. ;    If an unresolved procedure or function is not in the IDL 
  32. ;    search path, an error occurs, and no additional routines
  33. ;    are resolved.
  34. ;
  35. ; PROCEDURE:
  36. ;    This routine iteratively determines the names of unresolved calls
  37. ;    to user-written or library procedures and functions, and then
  38. ;    compiles them.  The process stops when there are no unresolved
  39. ;    routines.
  40. ; EXAMPLE:
  41. ;    RESOLVE_ALL.
  42. ; MODIFICATION HISTORY:
  43. ;     Written by:    Your name here, Date.
  44. ;    DMS, RSI, January, 1995.
  45. ;-
  46.  
  47. PRO resolve_all, QUIET = quiet
  48.  
  49. if n_elements(quiet) ne 0 then begin
  50.     quiet_save=!quiet
  51.     !quiet = quiet
  52. endif else quiet = 0
  53.  
  54. repeat begin
  55.     cnt = 0
  56.     a = ROUTINE_INFO(/UNRESOLVED)
  57.     if strlen(a[0]) gt 0 then begin
  58.     cnt = cnt + n_elements(a)
  59.     if quiet eq 0 then print,'Resolving procedures: ', a
  60.     resolve_routine, a
  61.     endif
  62.     a = ROUTINE_INFO(/FUNCTIONS, /UNRESOLVED)
  63.     if strlen(a[0]) gt 0 then begin
  64.     cnt = cnt + n_elements(a)
  65.     if quiet eq 0 then print,'Resolving functions: ', a
  66.     resolve_routine, a, /IS_FUNCTION
  67.     endif
  68. endrep until cnt eq 0
  69.  
  70. if n_elements(quiet_save) ne 0 then !quiet = quiet_save
  71. end
  72.